#-------------------------------------------------------------------------------------------------------------
# kylin-server-10-sp3b23-x86_64  开发环境基础镜像
#-------------------------------------------------------------------------------------------------------------

## kylin镜像
ARG OE_IMG=kylin-server-10-sp3b23-x86_64-20230324
## kylin版本
ARG OE_VER=b23gcc850


FROM ${OE_IMG}:${OE_VER}

## dev  group config
ARG GROUP_ID=1000
ARG GROUP_NAME=codespace


## dev user config
ARG USER_ID=1000
ARG USER_NAME=codespace


RUN yum install -y  glibc-all-langpacks shadow-utils \
    ##安装dev container必须依赖的包(https://code.visualstudio.com/docs/remote/linux)
    && yum install -y openssh-clients \
    ##glibc \
    ##libstdc++ \
    wget \
    unzip \
    zip \
    tar \
    sudo \
    curl \
    git \
    ##创建开发用户和组
    && groupadd -g ${GROUP_ID} ${GROUP_NAME} \
    && useradd -u ${USER_ID}  -g ${GROUP_NAME} -m  ${USER_NAME} \
    && chown -R ${USER_NAME}:${GROUP_NAME} /home/${USER_NAME} \
    ## 配置sudo
    && echo "${USER_NAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
    && chmod 0440 /etc/sudoers \
    ## 清理安装
    && yum clean all

ENV LANG="zh_CN.utf8"
ENV LANGUAGE="zh_CN:zh:en_US:en"


